﻿#ifndef NEWUSERRELATIONWIDGET_H
#define NEWUSERRELATIONWIDGET_H

#include <QDialog>
#include "userrelation.h"
#include "userrelationservice.h"

namespace Ui {
class NewUserRelationWidget;
}

class NewUserRelationWidget : public QDialog
{
    Q_OBJECT

public:
    explicit NewUserRelationWidget(QWidget *parent = nullptr);
    ~NewUserRelationWidget();

    void showAndClear();

    void setWidgetType(UserRelation::RelationType widgetType);

    void setDirectory(QStringList primaryDirectoryList, QList<QStringList> secondaryDirectoryList);

    void setCurrentDirectory(QString primaryDirectory, QString secondaryDirectory);
private slots:
    void on_pushButtonPlatformCancel_clicked();

    void on_pushButtonPlatformAdd_clicked();

    void on_pushButtonQuery_clicked();

    void on_pushButtonNonPlatformCancel_clicked();

    void on_pushButtonNonPlatformAdd_clicked();

    void on_comboBoxPrimaryDirectory_currentIndexChanged(int index);

private:
    Ui::NewUserRelationWidget *ui;

    UserRelation::RelationType widgetType;

    UserRelationService userRelationService;
    QString targetUsername;

    QStringList primaryDirectoryList;
    QList<QStringList> secondaryDirectoryList;
};

#endif // NEWUSERRELATIONWIDGET_H
